home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / RTL8029 / OEMSETUP.INF next >
INI File  |  1996-07-31  |  26KB  |  758 lines

  1. ;********************************************************************
  2. ;
  3. ; Realtek RTL8029 WINNT miniport driver oemsetup file(for WINNT 3.5)
  4. ;
  5. ;********************************************************************
  6.  
  7. [Identification]
  8.     OptionType = NetAdapter
  9. [PlatformsSupported]
  10.     ISA
  11.     EISA
  12.     "Jazz-Internal Bus"
  13. [Options]
  14.     RTL8029
  15. [FileConstants]
  16. UtilityInf    = "UTILITY.INF"
  17. ParamInf    = "NCPARAM.INF"
  18. subroutineinf    = "SUBROUTN.INF"
  19. SoftwareType    = "driver"
  20. Exit_Code    = 0
  21. NetEventDLL    = "%SystemRoot%\System32\netevent.dll"
  22. IoLogMsgDLL    = "%SystemRoot%\System32\IoLogMsg.dll"
  23. Manufacturer    = "Realtek"
  24. ProductMajorVersion    = "1"
  25. ProductMinorVersion    = "0"
  26. ProductVersion    = $(ProductMajorVersion)"."$(ProductMinorVersion)
  27. ProductSoftwareName    = "RTL8029"
  28. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\rtl8029.sys"
  29. NetRuleSoftwareType    = "rtl8029Sys ndisDriver rtl8029Driver"
  30. NetRuleSoftwareUse    = $(SoftwareType)
  31. NetRuleSoftwareBindForm = """Rtl8029Sys"" yes no container"
  32. NetRuleSoftwareClass    = {"rtl8029Driver basic"}
  33. NetRuleSoftwareBindable = {"rtl8029Driver rtl8029Adapter non exclusive 100"}
  34. ProductHardwareName    = "RTL8029"
  35. NetRuleHardwareType    = "rtl8029 rtl8029Adapter"
  36. NetRuleHardwareBindForm = " yes yes container"
  37. NetRuleHardwareClass    = {"rtl8029Adapter basic"}
  38. ProductKeyName    = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  39. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  40. [GeneralConstants]
  41. from      = ""
  42. to      = ""
  43. ExitCodeOk     = 0
  44. ExitCodeCancel = 1
  45. ExitCodeFatal  = 2
  46. KeyNull     = ""
  47. MAXIMUM_ALLOWED   = 33554432
  48. RegistryErrorIndex = NO_ERROR
  49. KeyProduct    = ""
  50. KeyParameters    = ""
  51. TRUE        = 1
  52. FALSE        = 0
  53. NoTitle        = 0
  54. ExitState   = "Active"
  55. OldVersionExisted = $(FALSE)
  56. DriverPath    = $(!STF_NTPATH)\drivers
  57. [date]
  58.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  59. [Identify]
  60.     read-syms Identification
  61.     set Status       = STATUS_SUCCESSFUL
  62.     set Identifier = $(OptionType)
  63.     set Media       = #("Source Media Descriptions", 1, 1)
  64.     Return $(Status) $(Identifier) $(Media)
  65. [ReturnOptions]
  66.     set Status          = STATUS_FAILED
  67.     set OptionList     = {}
  68.     set OptionTextList = {}
  69.     set LanguageList = ^(LanguagesSupported, 1)
  70.     Ifcontains(i) $($0) in $(LanguageList)
  71.     ifstr(i) $($1) == ""
  72.        goto returnoptions
  73.     endif
  74.     set PlatformList = ^(PlatformsSupported, 1)
  75.     Ifcontains(i) $($1) in $(PlatformList)
  76.        goto returnoptions
  77.     else
  78.        set Status = STATUS_NOTSUPPORTED
  79.        goto finish_ReturnOptions
  80.     endif
  81.     else
  82.     set Status = STATUS_NOLANGUAGE
  83.     goto finish_ReturnOptions
  84.     endif
  85. returnoptions = +
  86.     set OptionList     = ^(Options, 1)
  87.     set OptionTextList = ^(OptionsText$($0), 1)
  88.     set Status           = STATUS_SUCCESSFUL
  89. finish_ReturnOptions = +
  90.     Return $(Status) $(OptionList) $(OptionTextList)
  91. [InstallOption]
  92.     set Option     = $($1)
  93.     set SrcDir     = $($2)
  94.     set AddCopy  = $($3)
  95.     set DoCopy     = $($4)
  96.     set DoConfig = $($5)
  97.     set LanguageList = ^(LanguagesSupported, 1)
  98.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  99.     Return STATUS_NOLANGUAGE
  100.     endif
  101.     set-subst LF = "\n"
  102.     read-syms GeneralConstants
  103.     read-syms FileConstants
  104.     read-syms DialogConstants$(!STF_LANGUAGE)
  105.     ifstr(i) $(!NTN_Origination) == "NCPA"
  106.     set Continue = $(OK)
  107.     endif
  108.     read-syms FileConstants$(!STF_LANGUAGE)
  109.     detect date
  110.     set-title  $(FunctionTitle)
  111.     set to   = Begin
  112.     set from = Begin
  113.     set CommonStatus = STATUS_SUCCESSFUL
  114.     EndWait
  115. Begin = +
  116.     set ActivateDetection = FALSE
  117.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  118.         set StartLabel = removeadapter
  119.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  120.             set StartLabel = UpgradeSoftware
  121.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  122.         set StartLabel = bindingadapter
  123.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  124.         set CommonStatus = STATUS_REBOOT
  125.         set ActivateDetection = TRUE
  126.         set StartLabel = configureadapter
  127.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  128.             Debug-Output "Cannot configure the Realtek RTL8029 PCI driver software."
  129.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  130.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  131.                 Debug-Output "ShellCode error: cannot get an error string."
  132.                 goto ShellCodeError
  133.             endif
  134.             set Error = $($R0)
  135.             set from = end
  136.             set to = end
  137.             goto nonfatalinfo
  138.         endif
  139.     else
  140.         set StartLabel = installadapter
  141.         set OEM_ABANDON_OPTIONS = {}
  142.         set OEM_ABANDON_SOFTWARE = FALSE
  143.         set OEM_ABANDON_ON = TRUE
  144.         set ActivateDetection = TRUE
  145.     endif
  146.     Debug-Output "OEMNADN2.INF: =================================================="
  147.     Debug-Output "OEMNADN2.INF: STF_CWDIR is: "$(!STF_CWDIR)
  148.     Debug-Output "OEMNADN2.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  149.     Debug-Output "OEMNADN2.INF: Option is: "$(Option)
  150.     Debug-Output "OEMNADN2.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  151.     Debug-Output "OEMNADN2.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  152.     Debug-Output "OEMNADN2.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  153.     Debug-Output "OEMNADN2.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  154.     Debug-Output "OEMNADN2.INF: =================================================="
  155.     Set DetectedCard = FALSE
  156.     Set EtherID = ""
  157.     Ifstr(i) $(ActivateDetection) != TRUE
  158.     Goto skipdetection
  159.     Endif
  160. ;   Set TypeList = {{IRQ,IRQList,IRQValue},+
  161. ;            {IOADDR, IOBaseAddrDecList, IOBaseAddrValue}}
  162. ;   Debug-Output "OEMNADN2.INF: Calling Param_BuildTypeLists"
  163. ;   Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  164. ;   Set Status = $($R0)
  165. ;   ifstr(i) $(Status) != STATUS_SUCCESSFUL
  166. ;    Goto fataldetect
  167. ;   Endif
  168. ;   Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults"
  169. ;   Shell $(ParamInf) Param_SetDefaults {}
  170. ;   Shell $(ParamInf) HexListFromDecList $(IOBaseAddrDecList)
  171. ;   Set IOBaseAddrHexList = $($R0)
  172. ;   Shell $(UtilityInf) SortList $(IRQList) TRUE FALSE
  173. ;   Set IRQList = $($R0)
  174. ;3/6/95    Ifstr(i) $(!STF_NCDETECT) == YES
  175. ;3/6/95        Ifstr(i) $(!STF_NCOPTION) == $(Option)
  176. ;3/6/95       Set DetectedCard = TRUE
  177. ;3/6/95       Debug-Output "OEMNADN2.INF: Setting DetectedCard to TRUE"
  178. ;3/6/95        Endif
  179. ;3/6/95    Endif
  180. skipdetection =+
  181.     set from = $(fatal)
  182.     set to = $(fatal)
  183.     goto $(StartLabel)
  184. installadapter = +
  185.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  186.     Ifstr $(KeyProduct) != $(KeyNull)
  187.     CloseRegKey $(KeyProduct)
  188.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  189.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  190.            $(ProductVersion)
  191.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  192.            Debug-Output "ShellCode error: cannot get an error string."
  193.            goto ShellCodeError
  194.        endif
  195.        goto end
  196.     else
  197.        Shell $(UtilityInf), CardExistedDlg
  198.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  199.            Debug-Output "ShellCode error: cannot get an error string."
  200.            goto ShellCodeError
  201.        endif
  202.        ifstr(i) $($R1) != "OK"
  203.            set CommonStatus = STATUS_USERCANCEL
  204.            goto end
  205.        endif
  206.        set OldVersionExisted = $(TRUE)
  207.     endif
  208.     endif
  209.     Ifstr(i) $(DetectedCard) != TRUE
  210.     Goto adaptersetup
  211.     Endif
  212.     StartWait
  213.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  214.     EndWait
  215.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  216.     Goto adaptersetup
  217.     Endif
  218.     Set DetectedParams = $($R1)
  219.     Debug-Output "OEMNADN2.INF: Calling Param_SetDefaults to merge detected params"
  220.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  221.     goto adapteroptions
  222. configureadapter = +
  223.     Ifstr $(KeyProduct) == $(KeyNull)
  224.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  225.     Ifstr $(KeyProduct) == $(KeyNull)
  226.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  227.         Debug-Output "Cannot find component product key"
  228.         goto fatalregistry
  229.     Endif
  230.     Endif
  231.     Debug-Output "INF: Shelling to FindService"
  232.     Shell $(UtilityInf) FindService, $(KeyProduct)
  233.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  234.     Debug-Output "INF: FindService shell failure"
  235.     Goto ShellCodeError
  236.     Endif
  237.     Ifstr(i) $($R0) != NO_ERROR
  238.     Debug-Output "INF: FindService Shell error: "$($R0)
  239.     Goto fatalregistry
  240.     endif
  241.     set KeyParameters = $($R2)
  242.     CloseRegKey $($R1)
  243.     Ifstr $(KeyParameters) == $(KeyNull)
  244.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  245.     Debug-Output "Cannot find component service"
  246.     goto fatalregistry
  247.     endif
  248.     set OldVersionExisted = $(TRUE)
  249.     set ValueName = ""
  250.     set ValueData = ""
  251.     set ValueStr  = ""
  252.     set ValueList = {}
  253.     EnumRegValue $(KeyParameters) ValueList
  254.     ForListDo $(ValueList)
  255.     set ValueItem = $($)
  256.     set ValueName = *($(ValueItem),1)
  257.     set ValueData = *($(ValueItem),4)
  258. ;    Ifstr(i) $(ValueName) == "InterruptNumber"
  259. ;        set IRQValue = $(ValueData)
  260. ;    else-ifstr(i) $(ValueName) == "IoBaseAddress"
  261. ;        set IOBaseAddrValue = $(ValueData)
  262.     Ifstr(i) $(ValueName) == "EtherID"
  263.         set EtherID = $(ValueData)
  264.     else-ifstr(i) $(ValueName) == "BusType"
  265.         set BusInterfaceType = $(ValueData)
  266.     else-ifstr(i) $(ValueName) == "BusNumber"
  267.         set BusNumber = $(ValueData)
  268.     endif
  269.     EndForListDo
  270. ;   ifstr(i) $(IRQValue) == ""
  271. ;    set IRQValue = *($(IRQList), 2)
  272. ;   endif
  273. ;   ifstr(i) $(IOBaseAddrValue) == ""
  274. ;    set IOBaseAddrValue = *($(IOBaseAddrDecList), 1)
  275. ;   endif
  276. adaptersetup =+
  277.     Shell $(ParamInf) Param_ParameterConfidence
  278.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  279.     Debug-Output "OEMNADE2.INF: parameter confidence too low to bypass configuration"
  280.     Goto adapteroptions
  281.     Endif
  282.     Ifstr(i) $(DetectedCard) == TRUE
  283.     Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  284.         Goto adapterverify
  285.     Endif
  286.     Endif
  287.     goto adapteroptions
  288. adapteroptions = +
  289.     set from = adapteroptions
  290.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  291.     ifstr(i) $(!AutoNetInterfaceType) != ""
  292.         set BusInterfaceType = $(!AutoNetInterfaceType)
  293.     else
  294.         set BusInterfaceType = 1
  295.     endif
  296.     ifstr(i) $(!AutoNetBusNumber) != ""
  297.         set BusNumber = $(!AutoNetBusNumber)
  298.     else
  299.         set BusNumber = 0
  300.     endif
  301.     goto adapterverify
  302.     endif
  303. ;   set IOBaseAddress = *($(IOBaseAddrHexList), ~($(IOBaseAddrDecList),+
  304. ;    $(IOBaseAddrValue)))
  305.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  306.     ui start "InputDlg"
  307.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  308. ;        set IRQValue = $(Combo1Out)
  309. ;        set IOBaseAddress = $(Combo2Out)
  310.         set EtherID = $(EditTextOut)
  311.         ui pop 1
  312.     else-ifstr(i) $(DLGEVENT) == "EXIT"
  313. ;        set CommonStatus = STATUS_USERCANCEL
  314. ;        Debug-Output "Action: exit. Bye."
  315.         ui pop 1
  316. ;        goto end
  317.     else
  318.         ui pop 1
  319.         Debug-Output "Action: unknown. Bye."
  320.         goto end
  321.     endif
  322. ;   set IOBaseAddrValue = *($(IOBaseAddrDecList), ~($(IOBaseAddrHexList),+
  323. ;    $(IOBaseAddress)))
  324.     ifstr(i) $(!STF_NCDETINFO) == {}
  325.     Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  326.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  327.         Debug-Output "ShellCode error."
  328.         goto ShellCodeError
  329.     endif
  330.     set BusInterfaceType = $($R1)
  331.     set BusNumber = $($R2)
  332.     else
  333.     set BusInterfaceType = *($(!STF_NCDETINFO),5)
  334.     set BusNumber = *($(!STF_NCDETINFO),6)
  335.     endif
  336. adapterverify =+
  337.     Ifstr(i) $(DetectedCard) != TRUE
  338.     Goto skipoptions
  339.     Endif
  340.     Debug-Output "OEMNADN2.INF: Calling Param_VerifyCard"
  341.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  342.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  343.     Debug-Output "OEMNADN2.INF: Param_VerifyCard succeeded"
  344.     Goto skipoptions
  345.     Endif
  346.     Set from = adapteroptions
  347.     Set to = skipoptions
  348.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  349.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  350.     Debug-Output "ShellCode error: cannot get an error string."
  351.     goto ShellCodeError
  352.     endif
  353.     set Error = $($R0)
  354.     Goto Warning
  355. skipoptions =+
  356.     ifint $(OldVersionExisted) == $(TRUE)
  357.     ifstr(i) $(!NTN_InstallMode) == configure
  358.         goto writeparameters
  359.     endif
  360.     endif
  361.     StartWait
  362.     ifint $(OldVersionExisted) == $(FALSE)
  363.     ifstr(i) $(!NTN_InstallMode) == "install"
  364.         Ifstr(i) $(DoCopy) == "YES"
  365.             Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  366.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  367.             Goto ShellCodeError
  368.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  369.             Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  370.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  371.                goto ShellCodeError
  372.             endif
  373.             set Error = $($R0)
  374.             Goto fatal
  375.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  376.             Goto successful
  377.             Endif
  378.             Set SrcDir = $($R1)
  379.         Endif
  380.         install "Install-Option"
  381.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  382.             Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  383.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  384.             goto ShellCodeError
  385.             endif
  386.             set Error = $($R0)
  387.             goto fatal
  388.         endif
  389.     endif
  390.        Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  391.             $(ProductSoftwareName), +
  392.             $(ProductSoftwareName), +
  393.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  394.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  395.             $(NetEventDLL)
  396.        Set OEM_ABANDON_SOFTWARE = TRUE
  397.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  398.     Debug-Output "ShellCode error"
  399.     goto ShellCodeError
  400.        endif
  401.        set RegistryErrorIndex = $($R0)
  402.        set KeyProduct       = $($R1)
  403.        Set SoftNetRulesKey = $($R2)
  404.        CloseRegKey $($R3)
  405.        CloseRegKey $($R4)
  406.        CloseRegKey $($R5)
  407.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  408.     EndWait
  409.     Debug-Output "Registry error: add software components"
  410.     CloseRegKey $(KeyProduct)
  411.     CloseRegKey $(SoftNetRulesKey)
  412.     goto fatalregistry
  413.        endif
  414.        set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  415.            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  416.            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  417.            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  418.            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  419.            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  420.            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  421.        Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  422.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  423.     Debug-Output "ShellCode error."
  424.     goto ShellCodeError
  425.        endif
  426.        set RegistryErrorIndex = $($R0)
  427.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  428.     EndWait
  429.     Debug-Output "Registry error: add value list."
  430.     CloseRegKey $(KeyProduct)
  431.     CloseRegKey $(SoftNetRulesKey)
  432.     goto fatalregistry
  433.        endif
  434.        set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  435.             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  436.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  437.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  438.             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  439.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  440.        Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  441.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  442.     Debug-Output "ShellCode error."
  443.     goto ShellCodeError
  444.        endif
  445.        set RegistryErrorIndex = $($R0)
  446.        CloseRegKey $(KeyProduct)
  447.        CloseRegKey $(SoftNetRulesKey)
  448.        Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  449.     EndWait
  450.     Debug-Output "Resgitry error: add value list."
  451.     goto fatalregistry
  452.        endif
  453.     endif
  454.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  455.     ifint $($R4) != -1
  456.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  457.     endif
  458.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  459.         Debug-Output "Cannot add hardware component"
  460.         goto ShellCodeError
  461.     endif
  462.     set RegistryErrorIndex = $($R0)
  463.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  464.         EndWait
  465.         Debug-Output "Registry error: add hardware component"
  466.         CloseRegKey $($R1)
  467.         CloseRegKey $($R2)
  468.         CloseRegKey $($R3)
  469.         goto fatalregistry
  470.     endif
  471.     set KeyParameters = $($R3)
  472.     set KeyAdapterRules = $($R2)
  473.     set AdapterNumber = $($R4)
  474.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  475.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  476.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  477.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  478.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  479.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  480.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  481.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  482.         Debug-Output "ShellCode error"
  483.         goto ShellCodeError
  484.     endif
  485.     CloseRegKey $($R1)
  486.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  487.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  488.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  489.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  490.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  491.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  492.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  493.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  494.         Debug-Output "ShellCode error."
  495.         goto ShellCodeError
  496.     endif
  497.     set RegistryErrorIndex = $($R0)
  498.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  499.         EndWait
  500.         Debug-Output "Resgitry error: add value list."
  501.         CloseRegKey $(KeyParameters)
  502.         CloseRegKey $(KeyAdapterRules)
  503.         goto fatalregistry
  504.     endif
  505.     CloseRegKey $(KeyAdapterRules)
  506.     goto writeparameters
  507. writeparameters = +
  508.     set NewValueList = {{EtherID,$(NoTitle),$(!REG_VT_SZ),$(EtherID)},+
  509.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  510.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  511.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1}}
  512.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  513.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  514.     Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  515.     endif
  516.     CloseRegKey $(KeyParameters)
  517.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  518.         Debug-Output "ShellCode error."
  519.         goto ShellCodeError
  520.     endif
  521.     set RegistryErrorIndex = $($R0)
  522.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  523.         Debug-Output "Registry error: Add value list"
  524.         goto fatalregistry
  525.     endif
  526.     EndWait
  527.     goto successful
  528. bindingadapter =+
  529.     set Error = "Binding: Sorry, not yet implemented."
  530.     goto fatal
  531. removeadapter = +
  532.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  533.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  534.                 $(ProductSoftwareName)
  535.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  536.                 Debug-Output "ShellCode error"
  537.                 goto ShellCodeError
  538.         endif
  539.         set RegistryErrorIndex = $($R0)
  540.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  541.                 goto fatalregistry
  542.         endif
  543.     else
  544.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  545.             $(ProductSoftwareName), $(!NTN_RegBase)
  546.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  547.                 Debug-Output "ShellCode error"
  548.                 goto ShellCodeError
  549.         endif
  550.         set RegistryErrorIndex = $($R0)
  551.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  552.                 goto fatalregistry
  553.         endif
  554.     endif
  555.     goto end
  556. UpgradeSoftware = +
  557.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  558.     Ifstr $(KeyProduct) != $(KeyNull)
  559.     install "Install-Update"
  560.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  561.         goto fatal
  562.     endif
  563.     SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  564.     SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  565.     CloseRegKey $(KeyProduct)
  566.     else
  567.     goto fatalregistry
  568.     endif
  569.     goto end
  570. successful = +
  571.     goto end
  572. abandon = +
  573.     ForListDo $(OEM_ABANDON_OPTIONS)
  574.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  575.         $(ProductSoftwareName), $($)
  576.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  577.         Debug-Output "ShellCode error"
  578.         goto ShellCodeError
  579.     endif
  580.     set RegistryErrorIndex = $($R0)
  581.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  582.         goto fatalregistry
  583.     endif
  584.     EndForListDo
  585.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  586.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  587.         $(ProductSoftwareName), FALSE
  588.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  589.         Debug-Output "ShellCode error"
  590.         goto ShellCodeError
  591.     endif
  592.     set RegistryErrorIndex = $($R0)
  593.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  594.         goto fatalregistry
  595.     endif
  596.     endif
  597.     goto end
  598. warning = +
  599.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  600.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  601.     goto ShellCodeError
  602.     endif
  603.     ifstr(i) $($R1) == "OK"
  604.     goto $(to)
  605.     else-ifstr(i) $($R1) == "CANCEL"
  606.     goto $(from)
  607.     else
  608.     goto "end"
  609.     endif
  610. nonfatalinfo = +
  611.     Set CommonStatus = STATUS_USERCANCEL
  612.     Set Severity = STATUS
  613.     goto nonfatalmsg
  614. nonfatal = +
  615.     Set Severity = NONFATAL
  616.     goto nonfatalmsg
  617. nonfatalmsg = +
  618.     ifstr(i) $(Error) == ""
  619.     Set Severity = NONFATAL
  620.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  621.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  622.         goto ShellCodeError
  623.     endif
  624.     set Error = $($R0)
  625.     endif
  626.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  627.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  628.     goto ShellCodeError
  629.     endif
  630.     ifstr(i) $($R1) == "OK"
  631.     goto $(from)
  632.     else
  633.     goto "end"
  634.     endif
  635. fatalregistry = +
  636.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  637.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  638.     goto ShellCodeError
  639.     endif
  640.     set Error = $($R0)
  641.     goto fatal
  642. fataldetect = +
  643.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  644.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  645.     Debug-Output "ShellCode error: cannot get an error string."
  646.     goto ShellCodeError
  647.     endif
  648.     set Error = $($R0)
  649.     Goto fatal
  650. fatal = +
  651.     ifstr(i) $(Error) == ""
  652.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  653.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  654.         goto ShellCodeError
  655.     endif
  656.     set Error = $($R0)
  657.     endif
  658.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  659.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.     goto ShellCodeError
  661.     endif
  662.     goto setfailed
  663. ShellCodeError = +
  664.     set DlgType      = "MessageBox"
  665.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  666.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  667.     set STF_MB_TYPE  = 1
  668.     set STF_MB_ICON  = 3
  669.     set STF_MB_DEF   = 1
  670.     ui start "Error Message"
  671.     goto setfailed
  672. setfailed = +
  673.     set CommonStatus = STATUS_FAILED
  674.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  675.     set OEM_ABANDON_ON = FALSE
  676.     goto abandon
  677.     endif
  678.     goto end
  679. end = +
  680.     goto term
  681. term = +
  682.     Return $(CommonStatus)
  683. [Install-Option]
  684.     set STF_VITAL = ""
  685.     ifstr(i) $(AddCopy) == "YES"
  686.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  687.     endif
  688.     ifstr(i) $(DoCopy) == "YES"
  689.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  690.        CopyFilesInCopyList
  691.     endif
  692.     ifstr(i) $(DoConfig) == "YES"
  693.     endif
  694.     Exit
  695. [Install-Update]
  696.    set STF_VITAL    = ""
  697.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  698.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  699.    exit
  700. [Source Media Descriptions]
  701.          1 = "Realtek RTL8029 OEM Driver Disk" 
  702. [Signature]
  703.     FileType = MICROSOFT_DRVLIB_FILE
  704. [GetSignature]
  705.     read-syms Signature
  706.     return $(FileType)
  707. [ProductType]
  708. STF_PRODUCT  = Winnt
  709. STF_PLATFORM = I386
  710. [Files-Inf]
  711. 1,    oemsetup.inf,     SIZE=50000,     RENAME=$(!UG_Filename)
  712. [Files-RTL8029]
  713. 1,RTL8029.SYS , SIZE=50000
  714. [LanguagesSupported]
  715.     ENG
  716. [OptionsTextENG]
  717.     RTL8029    = "Realtek RTL8029 PCI Adapter"
  718. [FileConstantsENG]
  719. ProCaption   = "Windows NT Setup"
  720. ProCancel    = "Cancel"
  721. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  722.            "Are you sure you want to cancel copying files?"
  723. ProCancelCap = "Network Setup Message"
  724. ProText1     = "Copying:"
  725. ProText2     = "To:"
  726. FunctionTitle    = "Realtek RTL8029 PCI Network Card Setup"
  727. ProductSoftwareDescription    = "Realtek RTL8029 PCI Adapter Driver"
  728. ProductHardwareRTL8029Description     = "Realtek RTL8029 PCI Adapter"
  729. ProductSoftwareTitle    = "Realtek RTL8029 PCI Adapter Driver"
  730. ProductHardwareRTL8029Title     = "Realtek RTL8029 PCI Adapter"
  731. ShellCodeErrorTitle    = "Error: "$(FunctionTitle)
  732. ShellCodeErrorText    = "Shell Code Error."
  733. [DialogConstantsENG]
  734. Help        = "&Help"
  735. Exit        = "Cancel"
  736. OK        = "OK"
  737. HelpContext = ""
  738. Continue    = "Continue"
  739. Cancel        = "Cancel"
  740. [FileDependentDlgENG]
  741. Caption        = "Input Ethernet ID"
  742. DlgText        = "Please input adapter's Ethernet ID: "$(!LF)+
  743.          "For example:"$(!LF)+
  744.          "        Ethernet ID: 00 01 02 A3 B4 C5"$(!LF)$(!LF)+
  745.          "(This option is only required when you have more than "+
  746.          "one Realtek RTL8029 PCI LAN adapters on this computer. "+
  747.          "Select SKIP if only one adapter is installed on "+
  748.          "this computer.)"
  749. Edit1Label  = "&Ethernet ID:"
  750. Continue       = "&OK"
  751. Exit           = "&Skip"
  752. Help           = "&Help"
  753. DlgType        = "Edit"
  754. DlgTemplate    = "QUERY_COMPUTER_NAME"
  755. EditTextLim    = 17
  756. EditTextIn     = $(EtherID)
  757. EditFocus      = "ALL"
  758.